
  ___  ____  ____  ____  ____ (R)
 /__    /   ____/   /   ____/
___/   /   /___/   /   /___/   13.0   Copyright 1985-2013 StataCorp LP
  Statistics/Data Analysis            StataCorp
                                      4905 Lakeway Drive
     Special Edition                  College Station, Texas 77845 USA
                                      800-STATA-PC        http://www.stata.com
                                      979-696-4600        stata@stata.com
                                      979-696-4601 (fax)

16-user Stata network perpetual license:
       Serial number:  401306212364
         Licensed to:  Econometrics Laboratory
                       UC Berkeley

Notes:
      1.  (-v# option or -set maxvar-) 5000 maximum variables
      2.  Command line editing disabled
      3.  Stata running in batch mode

Note:  Your site can add messages to the introduction by editing the file
       stata.msg in the directory where Stata is installed.

. do evaluation.do 

. ********************************
. * This file constructs Tables 1-4
. * Instead of weighting, I control for X
. ********************************
. clear all

. set mem 4000m
set memory ignored.
    Memory no longer needs to be set in modern Statas; memory adjustments are
    performed on the fly automatically.

. set matsize 2000

. set maxvar 8000


. 
. use build.dta
(County and City Data Book [United States] Consolidated File: County Data, 1947
> -1)

. 
. 
. ********************************
. * NEW VARIABLES
. ********************************
. 
. * Per capita wage in manufacturing, in real dollars
. * Manufacturing payroll of production workers over average number of producti
> on workers 
. g wage0    = (pcmwage00)/(cpi0/100)
(298 missing values generated)

. g wage20   = (pcmwage20)/(cpi20/100)
(135 missing values generated)

. g wage30   = (pcmwage30)/(cpi30/100)
(426 missing values generated)

. g wage40   = (pcmwage39)/(cpi40/100)
(612 missing values generated)

. g wage50   = (pcmwage47)/(cpi50/100)
(487 missing values generated)

. g wage60   = (pcmwage58)/(cpi60/100)
(416 missing values generated)

. g wage70   = (pcmwage67)/(cpi70/100)
(696 missing values generated)

. g wage80   = (pcmwage82)/(cpi80/100)
(581 missing values generated)

. g wage90   = (pcmwage87)/(cpi90/100)
(664 missing values generated)

. g wage2000 = (pcmwage97)/(cpi2000/100)
(966 missing values generated)

. 
. 
. * Per capita wage in trade, in real dollars
. * total payroll in wholesale establishments + retail establishments / (total 
> workers in retail+ in wholsale)
. g twage30  = pctwage30/(cpi30/100) 
(147 missing values generated)

. g twage40  = pctwage40/(cpi40/100)
(147 missing values generated)

. g twage50  = pctwage54/(cpi50/100)
(580 missing values generated)

. g twage60  = pctwage63/(cpi60/100)
(123 missing values generated)

. g twage70  = pctwage72/(cpi70/100)
(99 missing values generated)

. g twage80  = pctwage82/(cpi80/100)
(175 missing values generated)

. g twage90  = pctwage87/(cpi90/100)
(272 missing values generated)

. g twage2000  = pctwage97/(cpi2000/100)
(617 missing values generated)

. 
. * Agricultural values
. 
. g lnfaval0 = ln(faval900/(cpi0/100))
(292 missing values generated)

. g lnfaval10 = ln(faval910/(cpi10/100))
(129 missing values generated)

. g lnfaval20 = ln(faval920/(cpi20/100))
(30 missing values generated)

. g lnfaval30 = ln(faval930/(cpi30/100))
(4 missing values generated)

. g lnfaval40 = ln(faval940/(cpi40/100))
(4 missing values generated)

. g lnfaval50 = ln(faval950/(cpi50/100))
(4 missing values generated)

. g lnfaval60 = ln(faval959/(cpi60/100))
(5 missing values generated)

. g lnfaval70 = ln(faval1969/(cpi70/100))
(16 missing values generated)

. g lnfaval80 = ln(faval1982/(cpi80/100))
(16 missing values generated)

. g lnfaval90 = ln(faval1992/(cpi90/100))
(19 missing values generated)

. g lnfaval2000=ln(faval2002/(cpi2000/100))
(6 missing values generated)

. 
. 
. * Median family income
. gen lnmedfaminc50  = ln(medfaminc50/(cpi50/100)) 
(17 missing values generated)

. gen lnmedfaminc60  = ln(medfaminc60/(cpi60/100)) 

. gen lnmedfaminc70  = ln(medfaminc70/(cpi70/100)) 
(1 missing value generated)

. gen lnmedfaminc80  = ln(medfaminc80/(cpi80/100)) 
(1 missing value generated)

. gen lnmedfaminc90  = ln(medfaminc80/(cpi90/100)) 
(1 missing value generated)

. gen lnmedfaminc2000= ln(medfaminc2000/(cpi2000/100))
(2 missing values generated)

. 
. * Farm production
. gen lnvfprod30   = log(vfprod30/(cpi30/100))
(1 missing value generated)

. gen lnvfprod40   = log(vfprod40/(cpi40/100))

. gen lnvfprod50   = log(vfprod50/(cpi50/100))

. gen lnvfprod60   = log(vfprod60/(cpi60/100))

. gen lnvfprod70   = log(vfprod70/(cpi70/100))

. gen lnvfprod80   = log(vfprod80/(cpi80/100))
(39 missing values generated)

. gen lnvfprod90   = log(vfprod90/(cpi90/100))
(25 missing values generated)

. gen lnvfprod2000 = log(vfprod2000/(cpi2000/100))
(7 missing values generated)

. 
. *Foreign born
. gen fb0=fbwmtot00 + fbwftot00 
(251 missing values generated)

. gen fb10=fbwtot10
(129 missing values generated)

. gen fb20=fbwmtot20 + fbwftot20 
(26 missing values generated)

. gen fb30=fbwmtot + fbwftot

. 
. gen fbshr20=fb20/(wmtot20 + wftot20)
(26 missing values generated)

. gen fbshr30=fb30/(wmtot + wftot)

. 
. *Housing Values/Rents
. 
. ren medrnt30_NHGIS medrnt30

. ren medhsval30_NHGIS medhsval30

. ren var88_county72 medhsval70

. ren var89_county72 medrnt70

. 
. foreach var in medhsval medrnt{
  2.         foreach yr in 30 40 50 60 70 80 90 2000{
  3.                 cap replace `var'`yr'=`var'`yr'/(cpi`yr'/100)
  4.         }
  5. }

. 
. *various
. drop other60

. 
. *drop counties experiencing big changes in area
. gen d=(b1_lnd01_county00 - area)/(b1_lnd01_county00 + area)/2

. drop if abs(d)>.03
(91 observations deleted)

. replace area=(b1_lnd01_county00 + area)/2
area was long now double
(2578 real changes made)

. 
. 
. 
. ******************************
. * standardize variable names *
. ******************************
. 
. 
. ren emp00 emp0

. ren manuf_jobs_00 manuf_jobs_0

. 
. foreach yr in 0 10 20 30 40 50 60 70 80 90 2000{
  2.         cap drop manuf`yr'
  3.         cap drop agr`yr'
  4.         ren manuf_jobs_`yr' manuf`yr'
  5.         cap ren ag_jobs`yr' agr`yr'
  6. }

. 
. 
. 
. 
. foreach yr in 0 10 20 30 60 80 90 2000{
  2.         gen other`yr'=emp`yr'-agr`yr'-manuf`yr'
  3. }
(236 missing values generated)
(120 missing values generated)
(27 missing values generated)
(5 missing values generated)
(1 missing value generated)
(1 missing value generated)
(2 missing values generated)

. 
. 
. *********************
. *    Make Share     *
. *********************
. 
. foreach var in manuf agr{
  2.         foreach yr in 0 10 20 30 40 50 60 70 80 90 2000{
  3.                 cap gen `var'shr`yr'=`var'`yr'/emp`yr'
  4.         }
  5. }

. 
. ********************
. * prepare outcomes *
. ********************
. 
. 
. foreach var in pop emp house wage twage agr manuf other medhsval medrnt fb{
  2.         cap gen ln`var'0=ln(`var'0)
  3.         cap gen ln`var'10=ln(`var'10)
  4.         cap gen ln`var'20=ln(`var'20)
  5.         cap gen ln`var'30=ln(`var'30)
  6.         cap gen ln`var'40=ln(`var'40)
  7.         cap gen ln`var'50=ln(`var'50)
  8.         cap gen ln`var'60=ln(`var'60)
  9.         cap gen ln`var'70=ln(`var'70)
 10.         cap gen ln`var'80=ln(`var'80)
 11.         cap gen ln`var'90=ln(`var'90)
 12.         cap gen ln`var'2000=ln(`var'2000)
 13. }

. 
. drop lntwage20  lnmedhsval20 lnmedrnt20 //stata confuses 20 and 2000

. 
. 
. *******************
. *Generate Controls*
. *******************
. g urbshare0=popurb0/pop0
(233 missing values generated)

. g urbshare10=popurb10/pop10
(123 missing values generated)

. g urbshare20=popurb20/pop20
(24 missing values generated)

. g urbshare30=popurb30/pop20
(24 missing values generated)

. gen popdens0=pop0/b1_lnd01_county00
(233 missing values generated)

. 
. 
. *fix zeros in covariate quantities
. 
. foreach var in agr manuf other{
  2.         foreach yr in 10 20 30{
  3.                 cap replace ln`var'`yr'=0 if `var'`yr'<=0
  4.                 gen no`var'`yr'dum=`var'`yr'<=0
  5.         }
  6. }

. 
. ren mfgcap00 mfgcap0

. gen lnmfgcap0=ln(mfgcap0)
(273 missing values generated)

. replace lnmfgcap0=0 if mfgcap0==0
(7 real changes made)

. 
. 
. 
. *fix wages
. 
. foreach var in wage twage{
  2.         foreach yr in 20 30{
  3.                 cap replace ln`var'`yr'=-1 if `var'`yr'==.
  4.                 cap gen no`var'`yr'dum=`var'`yr'==.
  5.         }
  6. }

. 
. 
. 
. *transformations
. foreach var of varlist elevmax elevrang popdens0 tillit10 tillit1020 tillit10
> 10 retsales radiorep totunemp area{
  2.         gen ln`var'=ln(`var')
  3. }
(233 missing values generated)
(24 missing values generated)
(118 missing values generated)
(1 missing value generated)
(6 missing values generated)

. 
. 
. center tmean* lnelevmax

. 
. foreach var of varlist c_lnelevmax white0 white20 white30 c_tmean* lnmanuf0 l
> nmanuf10 lnmanuf20 lnradiorep lnemp20 lnemp30 lnwage0 lnwage20 lnwage30 lntwa
> ge30 lnpop0 lnpop20 lnpop30 lnfaval0 lnfaval20 lnfaval30 tmean*{
  2.         gen `var'sq=`var'^2
  3.         gen `var'cub=`var'^3
  4. }
(233 missing values generated)
(233 missing values generated)
(24 missing values generated)
(24 missing values generated)
(900 missing values generated)
(900 missing values generated)
(120 missing values generated)
(120 missing values generated)
(27 missing values generated)
(27 missing values generated)
(1 missing value generated)
(1 missing value generated)
(27 missing values generated)
(27 missing values generated)
(277 missing values generated)
(277 missing values generated)
(233 missing values generated)
(233 missing values generated)
(24 missing values generated)
(24 missing values generated)
(274 missing values generated)
(274 missing values generated)
(28 missing values generated)
(28 missing values generated)
(4 missing values generated)
(4 missing values generated)

. 
. gen popdifsq=(lnpop30-lnpop20)^2
(24 missing values generated)

. gen empdifsq=(lnemp30-lnemp20)^2
(27 missing values generated)

. gen manufdifsq=(lnmanuf20-lnmanuf0)^2
(900 missing values generated)

. gen urbsharedifsq=(urbshare20-urbshare0)^2
(233 missing values generated)

. gen whitedifsq=(white20-white0)^2
(233 missing values generated)

. gen agrdifsq=(lnagr20-lnagr0)^2
(255 missing values generated)

. gen wagedifsq=(lnwage20-lnwage0)^2
(277 missing values generated)

. gen favaldifsq=(lnfaval20-lnfaval0)^2
(274 missing values generated)

. 
. gen agrshr30sq=agrshr30^2
(5 missing values generated)

. gen agrshr20sq=agrshr20^2
(27 missing values generated)

. 
. gen lnagr20sq=lnagr20^2
(27 missing values generated)

. gen lnagr0sq=lnagr0^2
(255 missing values generated)

. gen fbdifsq=(lnfb20-lnfb0)^2
(251 missing values generated)

. 
. gen wagedif2sq=(lnwage30-lnwage20)^2

. gen tmean_jan_jul=tmean_jan*tmean_jul

. 
. gen pctil20=tillit1020/t10tot20
(24 missing values generated)

. gen pctil30=tillit10/t10tot

. replace PRADIO=PRADIO/100
(2671 real changes made)

. gen urate30=totunemp/(totunemp+emp30)

. 
. 
. 
. global X "lnelevmax lnelevrang lnarea lnpop20 lnpop20sq lnpop30 lnpop30sq pop
> difsq agrshr20 agrshr20sq agrshr30 agrshr30sq manufshr20 manufshr30 nowage20 
> nowage30 lnwage20 lnwage30 notwage30 lntwage30 lnemp20 lnemp30 urbshare20 urb
> share30 lnfaval20 lnfaval30 lnmedhsval30 lnmedrnt30 white20 white20sq white30
>  white30sq pctil20 pctil30 PRADIO urate30 fbshr20 fbshr30"

. 
. run "~/geo/x_ols_JP_v11.ado" //use Juan Pablo's version of Conley (1999)

. global tables="~/latex/tables_raw"

. 
. 
. *******************************************
. *******************************************
. * Propensity score 
. *******************************************
. *******************************************
. 
. sum $X

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
   lnelevmax |      2672     7.18372    1.127627   2.833213   9.581491
  lnelevrang |      2672    6.472382    1.267688    2.70805   9.592332
      lnarea |      2672    6.550518    .7363313   3.198673   9.909171
     lnpop20 |      2648    9.856253    .9216612   6.940222   14.93164
   lnpop20sq |      2648    97.99487    18.78028   48.16668   222.9539
-------------+--------------------------------------------------------
     lnpop30 |      2672    9.897864    .9736989   7.234177   15.19733
   lnpop30sq |      2672    98.91544    20.09119   52.33332   230.9587
    popdifsq |      2648    .0424405     .154054   1.18e-09   5.376893
    agrshr20 |      2645    .5133317    .2393428          0          1
  agrshr20sq |      2645    .3207728    .2386314          0          1
-------------+--------------------------------------------------------
    agrshr30 |      2667    .4751176    .2317202          0          1
  agrshr30sq |      2667    .2794108    .2180256          0          1
  manufshr20 |      2645    .1183587    .1377249          0          1
  manufshr30 |      2672    .0854374    .1086329          0   1.042577
 nowage20dum |      2672    .0475299    .2128093          0          1
-------------+--------------------------------------------------------
 nowage30dum |      2672    .1534431    .3604816          0          1
    lnwage20 |      2672    1.443184    .6125392         -1   2.730856
    lnwage30 |      2672    1.344912    1.049209         -1   2.620676
notwage30dum |      2672    .0508982     .219831          0          1
   lntwage30 |      2672     1.79669    .6722974         -1   2.398963
-------------+--------------------------------------------------------
     lnemp20 |      2645     8.79458    .9977833    4.61512    14.1185
     lnemp30 |      2672    8.884856    1.007512   6.322565   14.40485
  urbshare20 |      2648    .1999792    .2415469          0          1
  urbshare30 |      2648    .2628718     .331775          0   2.933782
   lnfaval20 |      2644    5.641551    .8236685   2.995732   9.012499
-------------+--------------------------------------------------------
   lnfaval30 |      2668    5.574193    .8236583   2.482908   10.30676
lnmedhsval30 |      2619    9.546574    .4832749   8.073895   11.36807
  lnmedrnt30 |      2622    8.990487    .4435811   7.851218   10.34694
     white20 |      2648     .889634    .1831826   .0921502          1
   white20sq |      2648    .8249917    .2627823   .0084917          1
-------------+--------------------------------------------------------
     white30 |      2672    .8763055    .1838349   .1406302          1
   white30sq |      2672    .8016939    .2672737   .0197768          1
     pctil20 |      2648    .0650953    .0747869   .0015806   .5655269
     pctil30 |      2672    .0497284    .0558682   .0004784    .502906
    PRADIO30 |      2672    .2738112    .1759582          0      .7777
-------------+--------------------------------------------------------
     urate30 |      2672     .027643    .0200907          0    .139693
     fbshr20 |      2648    .0770435    .0822638          0   .5354601
     fbshr30 |      2672    .0543065    .0612852          0    .320442

. 
. logit tva $X, cluster(state)

note: nowage20dum != 0 predicts failure perfectly
      nowage20dum dropped and 83 obs not used

Iteration 0:   log pseudolikelihood = -601.86167  
Iteration 1:   log pseudolikelihood = -500.33539  
Iteration 2:   log pseudolikelihood = -332.80519  
Iteration 3:   log pseudolikelihood = -289.12204  
Iteration 4:   log pseudolikelihood = -275.34548  
Iteration 5:   log pseudolikelihood =  -267.2652  
Iteration 6:   log pseudolikelihood = -260.85231  
Iteration 7:   log pseudolikelihood = -259.79296  
Iteration 8:   log pseudolikelihood = -259.78068  
Iteration 9:   log pseudolikelihood = -259.78068  

Logistic regression                               Number of obs   =       2489
                                                  Wald chi2(22)   =          .
                                                  Prob > chi2     =          .
Log pseudolikelihood = -259.78068                 Pseudo R2       =     0.5684

                                 (Std. Err. adjusted for 47 clusters in state)
------------------------------------------------------------------------------
             |               Robust
         tva |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
   lnelevmax |   1.990741   .5065591     3.93   0.000     .9979037    2.983579
  lnelevrang |  -.9499507   .4032203    -2.36   0.018    -1.740248   -.1596535
      lnarea |  -1.854763   .5782767    -3.21   0.001    -2.988164    -.721361
     lnpop20 |  -50.50022   18.45222    -2.74   0.006    -86.66591   -14.33454
   lnpop20sq |   2.352819   .9994147     2.35   0.019     .3940016    4.311635
     lnpop30 |    26.5316   17.99592     1.47   0.140    -8.739759    61.80296
   lnpop30sq |  -1.389389    .940212    -1.48   0.139    -3.232171    .4533925
    popdifsq |  -19.60975   4.012243    -4.89   0.000     -27.4736    -11.7459
    agrshr20 |  -6.643038   2.228576    -2.98   0.003    -11.01097    -2.27511
  agrshr20sq |   3.995044   1.603101     2.49   0.013      .853023    7.137065
    agrshr30 |  -1.785593   3.605435    -0.50   0.620    -8.852115     5.28093
  agrshr30sq |   1.083973   2.262763     0.48   0.632    -3.350961    5.518906
  manufshr20 |  -1.584836   2.303865    -0.69   0.492    -6.100327    2.930656
  manufshr30 |   -4.58527   1.905166    -2.41   0.016    -8.319327   -.8512136
 nowage20dum |          0  (omitted)
 nowage30dum |   .4297995   1.932845     0.22   0.824    -3.358508    4.218107
    lnwage20 |  -1.137493   .6994541    -1.63   0.104    -2.508397    .2334122
    lnwage30 |   .3057595   .7551269     0.40   0.686    -1.174262    1.785781
notwage30dum |  -2.150037   2.188879    -0.98   0.326     -6.44016    2.140087
   lntwage30 |  -.7712123   .8064817    -0.96   0.339    -2.351887    .8094628
     lnemp20 |   .7961852   .8657649     0.92   0.358    -.9006828    2.493053
     lnemp30 |   6.348907   2.634326     2.41   0.016     1.185722    11.51209
  urbshare20 |  -3.621274   3.861574    -0.94   0.348    -11.18982    3.947271
  urbshare30 |   4.283208   3.161235     1.35   0.175    -1.912699    10.47912
   lnfaval20 |   -.863291   .7932583    -1.09   0.276    -2.418049    .6914667
   lnfaval30 |   .1773649   1.176538     0.15   0.880    -2.128607    2.483336
lnmedhsval30 |    -2.5812   .7187127    -3.59   0.000     -3.98985   -1.172549
  lnmedrnt30 |   3.003882   .6621823     4.54   0.000     1.706029    4.301736
     white20 |   52.29658   21.73858     2.41   0.016     9.689758    94.90341
   white20sq |  -44.07799   22.19669    -1.99   0.047     -87.5827   -.5732728
     white30 |  -53.47104   20.81156    -2.57   0.010    -94.26094   -12.68113
   white30sq |   46.69502    21.6565     2.16   0.031     4.249058    89.14098
     pctil20 |   .1313362    5.59845     0.02   0.981    -10.84143     11.1041
     pctil30 |   1.597235   10.41263     0.15   0.878    -18.81115    22.00562
    PRADIO30 |  -14.64703   4.657869    -3.14   0.002    -23.77628   -5.517773
     urate30 |  -53.09667   23.83091    -2.23   0.026     -99.8044   -6.388938
     fbshr20 |  -60.78523   58.94046    -1.03   0.302    -176.3064    54.73596
     fbshr30 |  -211.6445   122.3198    -1.73   0.084     -451.387    28.09797
       _cons |   91.87177   24.24085     3.79   0.000     44.36059     139.383
------------------------------------------------------------------------------
Note: 1090 failures and 0 successes completely determined.

. predict phat
(option pr assumed; Pr(tva))
(183 missing values generated)

. 
. keep if e(sample)==1
(183 observations deleted)

. 
. sum phat if tva==1, det

                           Pr(tva)
-------------------------------------------------------------
      Percentiles      Smallest
 1%       .02457       .0188506
 5%        .0733         .02457
10%     .1317301        .028003       Obs                 163
25%     .2763618       .0402206       Sum of Wgt.         163

50%     .5033334                      Mean           .4963477
                        Largest       Std. Dev.      .2691322
75%     .7235231       .9480265
90%     .8653018       .9553998       Variance       .0724322
95%     .9294564       .9735301       Skewness       .0784192
99%     .9735301       .9893857       Kurtosis        1.90468

. sum phat if tva==0, det

                           Pr(tva)
-------------------------------------------------------------
      Percentiles      Smallest
 1%     1.61e-31              0
 5%     2.04e-25              0
10%     2.76e-21              0       Obs                2326
25%     1.47e-15       1.18e-36       Sum of Wgt.        2326

50%     1.91e-07                      Mean           .0352946
                        Largest       Std. Dev.      .1079511
75%     .0052954       .8073446
90%     .0986937       .8148664       Variance       .0116534
95%     .2408053       .8286063       Skewness       4.296825
99%       .58255        .933342       Kurtosis       23.60986

. local cut=r(p25)

. 
. tab tva

        tva |      Freq.     Percent        Cum.
------------+-----------------------------------
          0 |      2,326       93.45       93.45
          1 |        163        6.55      100.00
------------+-----------------------------------
      Total |      2,489      100.00

. 
. preserve

. drop if phat<`cut'&tva==0
(582 observations deleted)

. 
. **Construct O-B weights**
. 
. mata: D=st_data(.,"tva")

. mata: one=J(rows(D),1,1)

. mata: nD=one-D

. order $X

. local K:word count $X

. mata: X=st_data(.,1..`K')

. mata: X=(one, X)

. mata: w=D'*X*invsym(quadcross(X,nD,X))*X'/sum(D)

. mata: w=w':*nD

. gen w=.
(1907 missing values generated)

. mata: st_store(.,"w",w)

. 
. replace w=1 if tva==1
(163 real changes made)

. sum w if tva==0

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
           w |      1744    .0005734    .0011643  -.0031567   .0045486

. sum w if tva==1

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
           w |       163           1           0          1          1

. 
. 
. /*
> **Make Maps**
> lab var phat "Probability of Treatment"
> lab var tva "TVA"
> spmap w using county_coordinates if tva==0&phat>`cut'&phat<., id(id) title("C
> ontrol Counties in Estimation Sample") legtitle("Oaxaca Weight")
> gr export /tmp/map0.eps, replace
> spmap w using county_coordinates if tva==1&phat!=., id(id) title("TVA Countie
> s in Estimation Sample")
> gr export /tmp/map1.eps, replace
> !ps2pdf -dEPSCrop /tmp/map0.eps map0.pdf
> !ps2pdf -dEPSCrop /tmp/map1.eps map1.pdf
> !rm /tmp/map0.eps /tmp/map1.eps
> 
> spmap tva using county_coordinates if phat>`cut'&phat<., id(id) title("Counti
> es in Estimation Sample") legend(off) note("Shaded Areas are in TVA")
> gr export /tmp/fullmap.eps, replace
> !ps2pdf -dEPSCrop /tmp/fullmap.eps fullmap.pdf
> !rm /tmp/fullmap.eps
> */
. restore

. 
. 
. 
. 
. 
. ***************************
. ** Table 1 Summary Stats 
. ***************************
. 
. 
. gen lnwageobs30=ln(wage30)
(305 missing values generated)

. gen lnwageobs20=ln(wage20)

. foreach var in lnpop lnemp lnhouse lnwageobs manufshr agrshr white urbshare p
> ctil fbshr lnfaval {
  2.         gen D_`var'=`var'30-`var'20
  3.         lab var D_`var' "Change in `var' 1920-1930"
  4. }
(305 missing values generated)

. 
. 
. qui estpost tabstat lnpop30 lnemp30 lnhouse30 lnwageobs30 manufshr30 agrshr30
>  white30 urbshare30 pctil30 fbshr30 lnfaval30 lnmedhsval30 lnmedrnt30 PRADIO 
> elevmax elevrang south D_* if tva==1, stat(mean) col(stat)

. eststo sum0

. qui inspect state if tva==1

. estadd scalar clusters = r(N_unique)

added scalar:
           e(clusters) =  6

. 
. 
. qui estpost tabstat lnpop30 lnemp30 lnhouse30 lnwageobs30 manufshr30 agrshr30
>  white30 urbshare30 pctil30 fbshr30 lnfaval30 lnmedhsval30 lnmedrnt30 PRADIO 
> elevmax elevrang south D_* if tva==0, stat(mean) col(stat)

. eststo sum1 

. qui inspect state if tva==0

. estadd scalar clusters = r(N_unique)

added scalar:
           e(clusters) =  46

. 
. qui estpost tabstat lnpop30 lnemp30 lnhouse30 lnwageobs30 manufshr30 agrshr30
>  white30 urbshare30 pctil30 fbshr30 lnfaval30 lnmedhsval30 lnmedrnt30 PRADIO 
> elevmax elevrang south D_* if tva==0&south==1, stat(mean) col(stat)

. eststo sum2 

. qui inspect state if tva==0&south==1

. estadd scalar clusters = r(N_unique)

added scalar:
           e(clusters) =  14

. 
. 
. drop if phat<`cut'
(582 observations deleted)

. 
. 
. qui estpost tabstat lnpop30 lnemp30 lnhouse30 lnwageobs30 manufshr30 agrshr30
>  white30 urbshare30 pctil30 fbshr30 lnfaval30 lnmedhsval30 lnmedrnt30 PRADIO 
> elevmax elevrang south D_* if tva==1, stat(mean) col(stat)

. eststo sum3

. qui inspect state if tva==1

. estadd scalar clusters = r(N_unique)

added scalar:
           e(clusters) =  6

. 
. qui estpost tabstat lnpop30 lnemp30 lnhouse30 lnwageobs30 manufshr30 agrshr30
>  white30 urbshare30 pctil30 fbshr30 lnfaval30 lnmedhsval30 lnmedrnt30 PRADIO 
> elevmax elevrang south D_* if tva==0, stat(mean) col(stat)

. eststo sum4 

. qui inspect state if tva==0

. estadd scalar clusters = r(N_unique)

added scalar:
           e(clusters) =  43

. 
. qui estpost tabstat lnpop30 lnemp30 lnhouse30 lnwageobs30 manufshr30 agrshr30
>  white30 urbshare30 pctil30 fbshr30 lnfaval30 lnmedhsval30 lnmedrnt30 PRADIO 
> elevmax elevrang south D_* if tva==0&south==1, stat(mean) col(stat) 

. eststo sum5 

. qui inspect state if tva==0&south==1

. estadd scalar clusters = r(N_unique)

added scalar:
           e(clusters) =  14

. 
. 
. esttab sum0 sum1 sum2 sum3 sum4 sum5 using $tables/summ.csv, cells(mean(fmt(3
> ))) stat(N clusters, fmt(0)) replace mlabels(lnpop30 lnemp30 lnhouse30 lnwage
> obs30 manufshr30 agrshr30 white30 urbshare30 pctil30 fbshr30 lnfaval30 lnmedh
> sval30 lnmedrnt30 PRADIO elevmax elevrang south) label unstack nodepvar
(output written to ~/latex/tables_raw/summ.csv)

. 
. ******************************
. *****************************
. * TABLE 2 -- Selection
. *****************************
. ******************************
. 
. 
. local i=1

. foreach var in lnpop lnemp lnhouse lnwage manufshr agrshr lnfaval{      
  2.         g  Dy = (`var'40-`var'0)/4
  3.         *Winsorize outliers
.         qui centile Dy, c(1 99)
  4.         qui replace Dy=r(c_1) if Dy<r(c_1)
  5.         qui replace Dy=r(c_2) if Dy>r(c_2)&Dy!=.
  6. 
.         qui reg Dy tva, cluster(state) 
  7.         eststo base`i'
  8.         qui x_ols Dy $X, cluster(state) bo(tva)
  9.         eststo eval`i'
 10.         qui x_ols Dy $X, lat(latitude) long(longitud) cut1(200) cut2(200) 
> bo(tva)
 11.         eststo cor_eval`i'
 12.         drop Dy 
 13.         local ++i
 14. }
(131 missing values generated)
(131 missing values generated)
(131 missing values generated)
(479 missing values generated)
(131 missing values generated)
(131 missing values generated)
(161 missing values generated)

. 
. 
. 
. esttab base* using $tables/base1.csv, replace keep(tva) mlabels(lnpop lnemp l
> nhouse lnwage manufshr agrshr lnfaval) b(3) se(3) star(* 0.1 ** 0.05 *** 0.01
> )
(output written to ~/latex/tables_raw/base1.csv)

. esttab eval* using $tables/eval1.csv, replace keep(tva) mlabels(lnpop lnemp l
> nhouse lnwage manufshr agrshr lnfaval) b(3) se(3) star(* 0.1 ** 0.05 *** 0.01
> )
(output written to ~/latex/tables_raw/eval1.csv)

. esttab cor_* using $tables/cor1.csv, replace keep(tva) mlabels(lnpop lnemp ln
> house lnwage manufshr agrshr lnfaval) b(3) se(3) star(* 0.1 ** 0.05 *** 0.01)
(output written to ~/latex/tables_raw/cor1.csv)

. 
. 
. 
. 
. 
. ******************************
. *****************************
. * TABLE 2A -- Selection (South Only)
. *****************************
. ******************************
. 
. local i=1

. foreach var in lnpop lnemp lnhouse lnwage manufshr agrshr lnfaval{      
  2.         g  Dy = (`var'40-`var'0)/4
  3. 
.         qui centile Dy, c(1 99)
  4.         qui replace Dy=r(c_1) if Dy<r(c_1)
  5.         qui replace Dy=r(c_2) if Dy>r(c_2)&Dy!=.
  6. 
.         qui x_ols Dy tva if south==1, lat(latitude) long(longitud) cut1(200) 
> cut2(200)
  7.         eststo base`i', title(`var')
  8.         qui x_ols Dy $X if south==1, lat(latitude) long(longitud) cut1(200
> ) cut2(200) bo(tva)
  9.         eststo cor_eval`i', title(`var')
 10.         drop Dy 
 11.         local ++i
 12. }
(131 missing values generated)
(131 missing values generated)
(131 missing values generated)
(479 missing values generated)
(131 missing values generated)
(131 missing values generated)
(161 missing values generated)

. 
. 
. 
. esttab base* using $tables/base1a.csv, replace keep(tva) mlabels(lnpop lnemp 
> lnhouse lnwage manufshr agrshr lnfaval) b(3) se(3) star(* 0.1 ** 0.05 *** 0.0
> 1)
(output written to ~/latex/tables_raw/base1a.csv)

. esttab cor_* using $tables/cor1a.csv, replace keep(tva) mlabels(lnpop lnemp l
> nhouse lnwage manufshr agrshr lnfaval) b(3) se(3) star(* 0.1 ** 0.05 *** 0.01
> )
(output written to ~/latex/tables_raw/cor1a.csv)

. 
. 
. ******************************
. *****************************
. * TABLE 3 -- Impacts
. *****************************
. ******************************
. 
. 
. 
. local i=1

. foreach var in lnpop lnwage lnagr lnmanuf lnvfprod lnmedfaminc lnfaval lnmedh
> sval{
  2.         
.         if "`var'"=="lnmedfaminc"{
  3.                 g Dy=(`var'2000-`var'50)/5
  4.         }
  5.         else{
  6.                 g  Dy = (`var'2000-`var'40)/6
  7.         }
  8. 
.         qui centile Dy, c(1 99)
  9.         qui replace Dy=r(c_1) if Dy<r(c_1)
 10.         qui replace Dy=r(c_2) if Dy>r(c_2)&Dy!=.
 11. 
.         qui reg Dy tva, cluster(state) 
 12.         eststo base`i', title(`var')
 13.         qui x_ols Dy $X, cluster(state) bo(tva)
 14.         eststo eval`i', title(`var')
 15.         qui x_ols Dy $X, lat(latitude) long(longitud) cut1(200) cut2(200) 
> bo(tva)
 16.         eststo cor_eval`i', title(`var')
 17.         drop Dy 
 18.         local ++i
 19. }
(735 missing values generated)
(4 missing values generated)
(2 missing values generated)
(1 missing value generated)
(1 missing value generated)

. 
. 
. esttab base* using $tables/base2.csv, replace keep(tva) mlabels(lnpop lnwage 
> lnagr lnmanuf lnvfprod lnmedfaminc lnfaval lnmedhsval) b(3) se(3) star(* 0.1 
> ** 0.05 *** 0.01)
(output written to ~/latex/tables_raw/base2.csv)

. esttab eval* using $tables/eval2.csv, replace keep(tva) mlabels(lnpop lnwage 
> lnagr lnmanuf lnvfprod lnmedfaminc lnfaval lnmedhsval) b(3) se(3) star(* 0.1 
> ** 0.05 *** 0.01)
(output written to ~/latex/tables_raw/eval2.csv)

. esttab cor_* using $tables/cor2.csv, replace keep(tva) mlabels(lnpop lnwage l
> nagr lnmanuf lnvfprod lnmedfaminc lnfaval lnmedhsval) b(3) se(3) star(* 0.1 *
> * 0.05 *** 0.01)
(output written to ~/latex/tables_raw/cor2.csv)

. 
. 
. 
. ******************************
. ***  Table 3A (South Only) ***
. ******************************
. 
. local i=1

. foreach var in lnpop lnwage lnagr lnmanuf lnvfprod lnmedfaminc lnfaval lnmedh
> sval{
  2.         
.         if "`var'"=="lnmedfaminc"{
  3.                 g Dy=(`var'2000-`var'50)/5
  4.         }
  5.         else{
  6.                 g  Dy = (`var'2000-`var'40)/6
  7.         }
  8. 
.         qui centile Dy, c(1 99)
  9.         qui replace Dy=r(c_1) if Dy<r(c_1)
 10.         qui replace Dy=r(c_2) if Dy>r(c_2)&Dy!=.
 11. 
.         qui x_ols Dy tva if south==1, lat(latitude) long(longitud) cut1(200) 
> cut2(200)
 12.         eststo base`i', title(`var')
 13.         qui x_ols Dy $X if south==1, lat(latitude) long(longitud) cut1(200
> ) cut2(200) bo(tva)
 14.         eststo cor_eval`i', title(`var')
 15.         drop Dy 
 16.         local ++i
 17. }
(735 missing values generated)
(4 missing values generated)
(2 missing values generated)
(1 missing value generated)
(1 missing value generated)

. 
. 
. esttab base* using $tables/base2a.csv, replace keep(tva) mlabels(lnpop lnwage
>  lnagr lnmanuf lnvfprod lnmedfaminc lnfaval lnmedhsval) b(3) se(3) star(* 0.1
>  ** 0.05 *** 0.01)
(output written to ~/latex/tables_raw/base2a.csv)

. esttab cor_* using $tables/cor2a.csv, replace keep(tva) mlabels(lnpop lnwage 
> lnagr lnmanuf lnvfprod lnmedfaminc lnfaval lnmedhsval) b(3) se(3) star(* 0.1 
> ** 0.05 *** 0.01)
(output written to ~/latex/tables_raw/cor2a.csv)

. 
. 
. 
. 
. *****************************************************
. *****************************************************
. * TABLE 4
. * By period 30-60 60-2000
. *****************************************************
. *****************************************************
. 
. local i=1

. foreach var in lnpop lnwage lnagr lnmanuf lnvfprod lnmedfaminc lnfaval lnmedh
> sval{
  2.         g Dy=(`var'2000-`var'60)/4
  3. 
. 
.         qui centile Dy, c(1 99)
  4.         qui replace Dy=r(c_1) if Dy<r(c_1)
  5.         qui replace Dy=r(c_2) if Dy>r(c_2)&Dy!=.
  6. 
.         qui x_ols Dy $X, cluster(state) bo(tva)
  7.         eststo eval1_`i', title(`var')
  8.         qui x_ols Dy $X if south==1, lat(latitude) long(longitud) cut1(200
> ) cut2(200) bo(tva)
  9. 
.         eststo eval1a_`i', title(`var')
 10. 
.         if "`var'"!="lnmedfaminc"{
 11.                 replace Dy=(`var'60-`var'40)/2
 12.                 qui centile Dy, c(1 99)
 13.                 qui replace Dy=r(c_1) if Dy<r(c_1)
 14.                 qui replace Dy=r(c_2) if Dy>r(c_2)&Dy!=.
 15. 
.                 qui x_ols Dy $X, cluster(state) bo(tva)
 16.                 eststo eval2_`i', title(`var')
 17.                 qui x_ols Dy $X if south==1, lat(latitude) long(longitud) 
> cut1(200) cut2(200) bo(tva)
 18.                 eststo eval2a_`i', title(`var')
 19.         }
 20. 
.         drop Dy 
 21.         local ++i
 22. }
(1907 real changes made)
(669 missing values generated)
(1546 real changes made, 107 to missing)
(1907 real changes made)
(1907 real changes made)
(4 missing values generated)
(1907 real changes made)
(1 missing value generated)
(1 missing value generated)
(1907 real changes made)
(4 missing values generated)
(1904 real changes made)

. 
. 
. esttab eval1_* using $tables/eval3first.csv, replace keep(tva) mlabels(lnpop 
> lnwage lnagr lnmanuf lnvfprod lnmedfaminc lnfaval lnmedhsval) b(3) se(3) star
> (* 0.1 ** 0.05 *** 0.01)
(output written to ~/latex/tables_raw/eval3first.csv)

. esttab eval1a_* using $tables/eval3firsta.csv, replace keep(tva) mlabels(lnpo
> p lnwage lnagr lnmanuf lnvfprod lnmedfaminc lnfaval lnmedhsval) b(3) se(3) st
> ar(* 0.1 ** 0.05 *** 0.01)
(output written to ~/latex/tables_raw/eval3firsta.csv)

. 
. esttab eval2_* using $tables/eval3second.csv, replace keep(tva) mlabels(lnpop
>  lnwage lnagr lnmanuf lnvfprod lnmedfaminc lnfaval lnmedhsval) b(3) se(3) sta
> r(* 0.1 ** 0.05 *** 0.01)
(output written to ~/latex/tables_raw/eval3second.csv)

. esttab eval2a_* using $tables/eval3seconda.csv, replace keep(tva) mlabels(lnp
> op lnwage lnagr lnmanuf lnvfprod lnmedfaminc lnfaval lnmedhsval) b(3) se(3) s
> tar(* 0.1 ** 0.05 *** 0.01)
(output written to ~/latex/tables_raw/eval3seconda.csv)

. 
. 
. 
end of do-file
